package com.example.demo.Service;

import com.example.demo.Entity.User;
import org.springframework.boot.autoconfigure.security.SecurityProperties;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.context.annotation.Bean;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

@FeignClient(name = "eureka-provider" , fallback = UserFallBack.class)
public interface UserFeignInterface {

    @GetMapping("getall")
    public List<User> getAllUsers();

    @GetMapping("getuser")
    public User getUserById(@RequestParam("id") int id);

    @GetMapping("count")
    public int count();
}
